package com.lagou.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.ResponseBody;

@FeignClient(value = "lagou-service-user", fallback = UserFeignClientFallback.class)
public interface UserFeignClient {
    /**
     * 是否已注册，根据邮箱判断,true代表已经注册过，false代表尚未注册
     *
     * @param email
     * @return
     */
    @GetMapping("/user/isRegistered/{email}")
     boolean isRegistered(@PathVariable("email") String email);

    /**
     * 根据token查询用户登录邮箱接口
     *
     * @param token
     * @return
     */
    @GetMapping("/user/info/{token}")
    String info(@PathVariable("token") String token);
}
